function DkggCtrl($injector,$scope, CtrlUtil, $element, $http,$state, $rootScope) {
	var back = false;

	var ctrl = this;
	var listUrl = ':root/kq/list';

	//CtrlUtil.build(this, listUrl)
	this.query = function () {
		ctrl.entities && (ctrl.entities.content = {})
		var p = CtrlUtil.getQueryParams(ctrl)
		$http.post(listUrl, p).success(function (r) {
			ctrl.entities = r;
		})
	}

	this.add = function () {
        //location.href = "components/manager/dkggAdd.html";
        self.openDialog();
	}

    self.openDialog = function () {
        require(['root/components/common/modal/modal'], function () {
            var modalService = $injector.get('modalService')
            self.modalService = modalService
            self.currentDialog = modalService.show({
                title: '添加考勤员',
                contentUrl: 'components/manager/dkggedit.html',
                ctrl: self
            })
        })
    }

	this.del = function (item) {
		var modalService = $injector.get('modalService');
		modalService.confirm({
			content: '确定要删除' + item.kqy + '吗?',
			result: item
		}).then(function (r) {
			$http.post(':root/kq/deleteKqy', r).success(function (R) {
				modalService.succ('删除成功', 1500)
				ctrl.refresh()
				ctrl.query()
			})
		})
	}

	this.refresh = function () {
		//设置显示tab页
		$("#tab li").removeClass("current");
		$('.tabUI').css('display','none');

		$('#dkgg_li').attr('class','current');
		$('#dkgg_tab').css('display','block');
	}

    if(undefined != getParam('isBack')){
        ctrl.refresh()
    }
}